import { createRouter, createWebHistory } from "vue-router";
import LoginRegisterVue from "@/components/login-register/LoginRegister.vue";
import MainVue from "@/components/main/Main.vue";
import AcountSetVue from "@/components/profile/AcountSet.vue";
import InformationVue from "@/components/profile/Information.vue";
// 导入子代路由
import { mainRouter } from "./main-body";
const routes = [
  {
    path: '/',
    component: MainVue,
    children: mainRouter
  },
  { path: '/Log', component: LoginRegisterVue },
  { path: '/Account', component: AcountSetVue },
  { path: '/Info', component: InformationVue },
]
const router = createRouter({
  // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
  history: createWebHistory(),
  routes, // `routes: routes` 的缩写
})
export default router